package com.dropgame.main;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.dropgame.tools.ImageButton;

public class AssetLoader {
	
	public static Texture startBackground;
	public static TextureRegion startBackgroundRegion;
	
	public static Texture start;
	public static TextureRegion startRegion;
	
	public static Texture transitionfade;
	public static TextureRegion transitionregion;
	public static Sprite transitionSprite;
	
	public static Texture gameBackground;
	public static TextureRegion gameBackgroundRegion;
	
	public static Texture startButton;
	public static Sprite startButtonSprite;
	
	public static Texture greenTexture;
	public static TextureRegion greenRegion;
	
	public static Texture orangeTexture;
	public static TextureRegion orangeRegion;
	
	public static Texture purpleTexture;
	public static TextureRegion purpleRegion;
	
	public static Texture toxicTexture;
	public static TextureRegion toxicRegion;
	
	public static Texture joe;
	
	public static Texture buttons;
	public static TextureRegion wStart;
	public static TextureRegion startIn;
	public static TextureRegion start2;
	public static TextureRegion start3;
	public static TextureRegion start4;
	public static TextureRegion start5;
	
	public static TextureRegion button1;
	public static TextureRegion button2;
	public static TextureRegion button3;
	public static TextureRegion button4;
	
	public static TextureRegion button1Test;
	
	public static Animation anamStart;
	
	
	
	public static TextureAtlas backGroundAtlas;
	
	public static Sprite savanah;
	public static Sprite city;
	public static Sprite grassLand;
	
	
	
	public static TextureAtlas buttonAtlas;
	
	public static Sprite startButton1;
	public static Sprite startButton2;
	public static Sprite startButton3;
	public static Sprite startButton4;
	public static Sprite startButton5;
	
	public static Sprite playButton1;
	public static Sprite playButton2;
	public static Sprite playButton3;
	public static Sprite playButton4;
	public static Sprite playButton5;
	
	public static Sprite exitButton;
	public static Sprite storyButton;
	public static Sprite freePlayButton;
	public static Sprite optionsButton;
	public static Sprite blackButton;
	
	
	
	public static TextureAtlas button2Atlas;
	
	public static Sprite profileButton;
	public static Sprite blankButton;
	
	
	
	public static TextureAtlas button3Atlas;
	
	public static Sprite exitButtonSmall;
	public static Sprite backButton;
	public static Sprite backButtonSmall;
	public static Sprite smallButtonTemplate;
	
	
	
	public static TextureAtlas levelButtonAtlas;
	
	public static Sprite level1Button;
	public static Sprite level2Button;
	public static Sprite level3Button;
	public static Sprite level4Button;
	public static Sprite level5Button;
	public static Sprite level6Button;
	public static Sprite lockedCross;
	public static Sprite level1Lock;
	public static Sprite level2Lock;
	
	
	public static TextureAtlas arrowAtlas;
	
	public static Sprite upArrow;
	public static Sprite downArrow;
	
	
	
	
	public static TextureAtlas toastAtlas;
	
	public static Sprite blueToast;
	public static Sprite brownToast;
	
	
	
	
	public static TextureAtlas yesnoAtlas;
	
	public static Sprite yesButton;
	public static Sprite noButton;
	
	
	public static Texture loadTexture(String file){
		return new Texture(Gdx.files.internal(file));
	}
	
	public static void load(){
		backGroundAtlas = new TextureAtlas(Gdx.files.internal("data/backgrounds/mountainpack"));
		savanah = backGroundAtlas.createSprite("savanah");
		city = backGroundAtlas.createSprite("The");
		grassLand = backGroundAtlas.createSprite("645");
		
		
		
		
		buttonAtlas = new TextureAtlas(Gdx.files.internal("data/buttons/buttons.pack"));
		startButton1 = buttonAtlas.createSprite("start1");
		startButton2 = buttonAtlas.createSprite("start2");
		startButton3 = buttonAtlas.createSprite("start3");
		startButton4 = buttonAtlas.createSprite("start4");
		startButton5 = buttonAtlas.createSprite("start5");
		
		playButton1 = buttonAtlas.createSprite("play1");
		playButton2 = buttonAtlas.createSprite("play2");
		playButton3 = buttonAtlas.createSprite("play3");
		playButton4 = buttonAtlas.createSprite("play4");
		playButton5 = buttonAtlas.createSprite("play5");
		
		exitButton = buttonAtlas.createSprite("exit");
		storyButton = buttonAtlas.createSprite("story");
		freePlayButton = buttonAtlas.createSprite("freeplay");
		optionsButton = buttonAtlas.createSprite("options");
		blackButton = buttonAtlas.createSprite("blackButton");
		
		
		
		
		button2Atlas = new TextureAtlas(Gdx.files.internal("data/buttons2/buttons2"));
		profileButton = button2Atlas.createSprite("profileButton");
		blankButton = button2Atlas.createSprite("buttonTemplate");
		
		
		
		button3Atlas = new TextureAtlas(Gdx.files.internal("data/buttons3/buttons3"));
		exitButtonSmall = button3Atlas.createSprite("exitButtonSmall");
		backButton = button3Atlas.createSprite("backButton");
		backButtonSmall = button3Atlas.createSprite("backButtonSmall");
		smallButtonTemplate = button3Atlas.createSprite("buttonTemplateSmall");
		
		
		
		
		arrowAtlas = new TextureAtlas(Gdx.files.internal("data/arrows/arrows"));
		upArrow = arrowAtlas.createSprite("upbuttonsmall");
		downArrow = arrowAtlas.createSprite("downbuttonsmall");
		
		
		
		
		levelButtonAtlas = new TextureAtlas(Gdx.files.internal("data/levelButtons/levelButtons"));
		level1Button = levelButtonAtlas.createSprite("level1Button");
		level2Button = levelButtonAtlas.createSprite("level2Button");
		level3Button = levelButtonAtlas.createSprite("level3Button");
		level4Button = levelButtonAtlas.createSprite("level4Button");
		level5Button = levelButtonAtlas.createSprite("level5Button");
		level6Button = levelButtonAtlas.createSprite("level6Button");
		lockedCross = levelButtonAtlas.createSprite("lockedCross");
		level1Lock = levelButtonAtlas.createSprite("lockedCross");
		level2Lock = levelButtonAtlas.createSprite("lockedCross");
		
		
		
		toastAtlas = new TextureAtlas(Gdx.files.internal("data/toastScreens/toastScreens"));
		blueToast = toastAtlas.createSprite("blueSplashSmal");
		brownToast = toastAtlas.createSprite("brownSplashScreenSmallBorder");
		
		
		
		
		yesnoAtlas = new TextureAtlas(Gdx.files.internal("data/yesnoButtons/yesno"));
		yesButton = yesnoAtlas.createSprite("yesButton");
		noButton = yesnoAtlas.createSprite("noButton");
		
		
		
		
		
		startBackground = loadTexture("data/startBackGround.png");
		startBackgroundRegion = new TextureRegion(startBackground, 0, 0, 320, 480);
		start = loadTexture("data/start3scaled.png");
		startRegion = new TextureRegion(start);
		startButton = loadTexture("data/start3scaled.png");
		startButtonSprite = new Sprite(startButton);
		buttons = loadTexture("data/buttons.png");
		wStart = new TextureRegion(buttons, 1, 2, 155, 42);
		startIn = new TextureRegion(buttons, 156, 2, 155, 42);
		start2 = new TextureRegion(buttons, 314, 2, 155, 42);
		start3 = new TextureRegion(buttons, 1, 46, 155, 42);
		start4 = new TextureRegion(buttons, 156, 46, 155, 42);
		start5 = new TextureRegion(buttons, 314, 46, 155, 42);
		
		button1 = new TextureRegion(buttons, 4, 92, 145, 145);
		button2 = new TextureRegion(buttons, 152, 92, 145, 145);
		button3 = new TextureRegion(buttons, 300, 92, 145, 145);
		button4 = new TextureRegion(buttons, 4, 238, 145, 145);
		
		button1Test = new TextureRegion(buttons, 1, 2, 155, 250);
		
		anamStart = new Animation(0.1f, wStart, start2, start3, start4, start5,
									startIn);
		
		transitionfade = loadTexture("data/transitionfade.png");
		transitionregion = new TextureRegion(transitionfade, 0, 0, 320, 420);
		transitionSprite = new Sprite(transitionregion);
		gameBackground = loadTexture("data/gameBackGround.png");
		gameBackgroundRegion = new TextureRegion(gameBackground, 0, 0, 320, 480);
		joe = loadTexture("data/joe.png");
		
		greenTexture = loadTexture("data/greenresized.png");
		greenRegion = new TextureRegion(greenTexture, 0, 0, 42, 42);
		orangeTexture = loadTexture("data/orangeresized.png");
		orangeRegion = new TextureRegion(orangeTexture, 0, 0, 42, 42);
		purpleTexture = loadTexture("data/purpleresized.png");
		purpleRegion = new TextureRegion(purpleTexture, 0, 0, 42, 42);
		toxicTexture = loadTexture("data/blackresized.png");
		toxicRegion = new TextureRegion(toxicTexture, 0, 0, 42, 42);
		
		
		
		
	}
	
	public static void playSound(){
		
	}

}
